package com.liang.demo.controller;

import com.liang.demo.base.RestResponse;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 陈琪亮
 * @version 1.0
 * @date 2021/3/21 15:00
 */
@RestController
@RequiresRoles(value = {"订单管理员", "超级管理员"},logical= Logical.OR)
public class OrderController {

    //订单设置管理
    @RequiresPermissions(value = {"orderSetting:*"})
    @GetMapping("/api/order/orderSetting")
    public RestResponse<String> orderSettingManager(){
        return RestResponse.ok("订单设置管理");
    }

    //退货申请管理
    @RequiresPermissions(value = {"returnApply:*"})
    @GetMapping("/api/order/returnApply")
    public RestResponse<String> returnApplyManager(){
        return RestResponse.ok("退货申请管理");
    }

    //退货原因设置
    @RequiresPermissions(value = {"returnReason:*"})
    @GetMapping("/api/order/returnReason")
    public RestResponse<String> returnReasonManager(){
        return RestResponse.ok("退货原因设置");
    }
}
